package cn.edu.zafu.bigdata.x.xiejunjie.例4_4;

public class PassTest {
    float ptValue;

    public void changeInt(int value){
        value = 55;
    }

    public void changeStr(String value){
        value = new String("different");
    }

    public void changeObjValue(PassTest ref){
        ref.ptValue = 99.0f;
    }

    public static void main(String[] args) {
        String str;
        int val;

        PassTest pt = new PassTest();

        val = 11;
        pt.changeInt(val);
        System.out.println("Int value is:"+val);

        str = new String("Hello");
        pt.changeStr(str);
        System.out.println("Str value is:"+str);

        pt.ptValue = 101.0f;
        pt.changeObjValue(pt);
        System.out.println("Pt value is:"+pt.ptValue);
    }
}
